Integrand size = 16, antiderivative size = 169 \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\frac {c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {i (c+d x)^3}{3 d}+\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \log (\cos (a+b x))}{b^3}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}+\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {3801, 3556, 3800, 2221, 2611, 2320, 6724} \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac {d^2 \log (\cos (a+b x))}{b^3}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}+\frac {c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {i (c+d x)^3}{3 d} \]
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 3556
Rule 3800
Rule 3801
Rule 6724
Rubi steps \begin{align*} \text {integral}& = \frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {d \int (c+d x) \tan ^2(a+b x) \, dx}{b}-\int (c+d x)^2 \tan (a+b x) \, dx \\ & = -\frac {i (c+d x)^3}{3 d}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}+2 i \int \frac {e^{2 i (a+b x)} (c+d x)^2}{1+e^{2 i (a+b x)}} \, dx+\frac {d \int (c+d x) \, dx}{b}+\frac {d^2 \int \tan (a+b x) \, dx}{b^2} \\ & = \frac {c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {i (c+d x)^3}{3 d}+\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \log (\cos (a+b x))}{b^3}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac {(2 d) \int (c+d x) \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b} \\ & = \frac {c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {i (c+d x)^3}{3 d}+\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \log (\cos (a+b x))}{b^3}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}+\frac {\left (i d^2\right ) \int \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right ) \, dx}{b^2} \\ & = \frac {c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {i (c+d x)^3}{3 d}+\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \log (\cos (a+b x))}{b^3}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b}+\frac {d^2 \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^3} \\ & = \frac {c d x}{b}+\frac {d^2 x^2}{2 b}-\frac {i (c+d x)^3}{3 d}+\frac {(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \log (\cos (a+b x))}{b^3}-\frac {i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}+\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \tan ^2(a+b x)}{2 b} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(454\) vs. \(2(169)=338\).
Time = 6.74 (sec) , antiderivative size = 454, normalized size of antiderivative = 2.69 \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\frac {i d^2 e^{-i a} \left (2 b^2 x^2 \left (2 b x-3 i \left (1+e^{2 i a}\right ) \log \left (1+e^{-2 i (a+b x)}\right )\right )+6 b \left (1+e^{2 i a}\right ) x \operatorname {PolyLog}\left (2,-e^{-2 i (a+b x)}\right )-3 i \left (1+e^{2 i a}\right ) \operatorname {PolyLog}\left (3,-e^{-2 i (a+b x)}\right )\right ) \sec (a)}{12 b^3}+\frac {(c+d x)^2 \sec ^2(a+b x)}{2 b}+\frac {c^2 \sec (a) (\cos (a) \log (\cos (a) \cos (b x)-\sin (a) \sin (b x))+b x \sin (a))}{b \left (\cos ^2(a)+\sin ^2(a)\right )}-\frac {d^2 \sec (a) (\cos (a) \log (\cos (a) \cos (b x)-\sin (a) \sin (b x))+b x \sin (a))}{b^3 \left (\cos ^2(a)+\sin ^2(a)\right )}+\frac {c d \csc (a) \left (b^2 e^{-i \arctan (\cot (a))} x^2-\frac {\cot (a) \left (i b x (-\pi -2 \arctan (\cot (a)))-\pi \log \left (1+e^{-2 i b x}\right )-2 (b x-\arctan (\cot (a))) \log \left (1-e^{2 i (b x-\arctan (\cot (a)))}\right )+\pi \log (\cos (b x))-2 \arctan (\cot (a)) \log (\sin (b x-\arctan (\cot (a))))+i \operatorname {PolyLog}\left (2,e^{2 i (b x-\arctan (\cot (a)))}\right )\right )}{\sqrt {1+\cot ^2(a)}}\right ) \sec (a)}{b^2 \sqrt {\csc ^2(a) \left (\cos ^2(a)+\sin ^2(a)\right )}}+\frac {\sec (a) \sec (a+b x) \left (-c d \sin (b x)-d^2 x \sin (b x)\right )}{b^2}-\frac {1}{3} x \left (3 c^2+3 c d x+d^2 x^2\right ) \tan (a) \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 408 vs. \(2 (153 ) = 306\).
Time = 0.70 (sec) , antiderivative size = 409, normalized size of antiderivative = 2.42
method | result | size |
risch | \(-\frac {2 i d c \,a^{2}}{b^{2}}+\frac {2 i d^{2} a^{2} x}{b^{2}}-\frac {i c d \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{b^{2}}+\frac {4 i d^{2} a^{3}}{3 b^{3}}+\frac {2 b \,d^{2} x^{2} {\mathrm e}^{2 i \left (x b +a \right )}+4 b c d x \,{\mathrm e}^{2 i \left (x b +a \right )}+2 b \,c^{2} {\mathrm e}^{2 i \left (x b +a \right )}-2 i d^{2} x \,{\mathrm e}^{2 i \left (x b +a \right )}-2 i c d \,{\mathrm e}^{2 i \left (x b +a \right )}-2 i d^{2} x -2 i d c}{b^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )^{2}}+i c^{2} x +\frac {d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{2}}{b}-\frac {i d^{2} x^{3}}{3}+\frac {4 c d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{b^{2}}+\frac {i c^{3}}{3 d}-\frac {4 i d c x a}{b}-\frac {2 c^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b}-\frac {2 d^{2} a^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}-i d c \,x^{2}+\frac {c^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b}+\frac {2 c d \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x}{b}+\frac {d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{2 b^{3}}-\frac {d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b^{3}}+\frac {2 d^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}\) | \(409\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 354 vs. \(2 (150) = 300\).
Time = 0.26 (sec) , antiderivative size = 354, normalized size of antiderivative = 2.09 \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\frac {2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + d^{2} {\rm polylog}\left (3, \frac {\tan \left (b x + a\right )^{2} + 2 i \, \tan \left (b x + a\right ) - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + d^{2} {\rm polylog}\left (3, \frac {\tan \left (b x + a\right )^{2} - 2 i \, \tan \left (b x + a\right ) - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \tan \left (b x + a\right )^{2} - 2 \, {\left (-i \, b d^{2} x - i \, b c d\right )} {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) - 2 \, {\left (i \, b d^{2} x + i \, b c d\right )} {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) + 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - d^{2}\right )} \log \left (-\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - d^{2}\right )} \log \left (-\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) - 4 \, {\left (b d^{2} x + b c d\right )} \tan \left (b x + a\right )}{4 \, b^{3}} \]
[In]
[Out]
\[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\int \left (c + d x\right )^{2} \tan ^{3}{\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1228 vs. \(2 (150) = 300\).
Time = 0.50 (sec) , antiderivative size = 1228, normalized size of antiderivative = 7.27 \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\int { {\left (d x + c\right )}^{2} \tan \left (b x + a\right )^{3} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x)^2 \tan ^3(a+b x) \, dx=\int {\mathrm {tan}\left (a+b\,x\right )}^3\,{\left (c+d\,x\right )}^2 \,d x \]
[In]
[Out]